// This file is part of Acala.

// Copyright (C) 2020-2025 Acala Foundation.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

//! Autogenerated weights for module_asset_registry
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 35.0.1
//! DATE: 2024-04-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `ip-172-31-38-126`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
// target/production/acala
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=*
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --template=./templates/runtime-weight-template.hbs
// --output=./runtime/mandala/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for module_asset_registry.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> module_asset_registry::WeightInfo for WeightInfo<T> {
	// Storage: `AssetRegistry::NextForeignAssetId` (r:1 w:1)
	// Proof: `AssetRegistry::NextForeignAssetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	// Storage: `AssetRegistry::LocationToCurrencyIds` (r:1 w:1)
	// Proof: `AssetRegistry::LocationToCurrencyIds` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `AssetRegistry::ForeignAssetLocations` (r:1 w:1)
	// Proof: `AssetRegistry::ForeignAssetLocations` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn register_foreign_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1143`
		//  Estimated: `4608`
		// Minimum execution time: 21_869 nanoseconds.
		Weight::from_parts(22_452_000, 4608)
			.saturating_add(T::DbWeight::get().reads(4))
			.saturating_add(T::DbWeight::get().writes(4))
	}
	// Storage: `AssetRegistry::ForeignAssetLocations` (r:1 w:1)
	// Proof: `AssetRegistry::ForeignAssetLocations` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn update_foreign_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1299`
		//  Estimated: `4764`
		// Minimum execution time: 21_947 nanoseconds.
		Weight::from_parts(22_647_000, 4764)
			.saturating_add(T::DbWeight::get().reads(2))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	// Storage: `AssetRegistry::NextStableAssetId` (r:1 w:1)
	// Proof: `AssetRegistry::NextStableAssetId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn register_stable_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1143`
		//  Estimated: `4608`
		// Minimum execution time: 16_438 nanoseconds.
		Weight::from_parts(16_997_000, 4608)
			.saturating_add(T::DbWeight::get().reads(2))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn update_stable_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1237`
		//  Estimated: `4702`
		// Minimum execution time: 17_539 nanoseconds.
		Weight::from_parts(18_024_000, 4702)
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	// Storage: `EVM::Accounts` (r:2 w:0)
	// Proof: `EVM::Accounts` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `System::Digest` (r:1 w:0)
	// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	// Storage: `EVM::Codes` (r:1 w:0)
	// Proof: `EVM::Codes` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `EVM::AccountStorages` (r:5 w:0)
	// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	// Storage: `AssetRegistry::Erc20IdToAddress` (r:1 w:1)
	// Proof: `AssetRegistry::Erc20IdToAddress` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn register_erc20_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `7617`
		//  Estimated: `20982`
		// Minimum execution time: 207_102 nanoseconds.
		Weight::from_parts(210_688_000, 20982)
			.saturating_add(T::DbWeight::get().reads(11))
			.saturating_add(T::DbWeight::get().writes(2))
	}
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn update_erc20_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1388`
		//  Estimated: `4853`
		// Minimum execution time: 26_675 nanoseconds.
		Weight::from_parts(27_417_000, 4853)
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn register_native_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1143`
		//  Estimated: `4608`
		// Minimum execution time: 15_738 nanoseconds.
		Weight::from_parts(16_094_000, 4608)
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
	// Storage: `AssetRegistry::AssetMetadatas` (r:1 w:1)
	// Proof: `AssetRegistry::AssetMetadatas` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn update_native_asset() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `1212`
		//  Estimated: `4677`
		// Minimum execution time: 17_078 nanoseconds.
		Weight::from_parts(17_412_000, 4677)
			.saturating_add(T::DbWeight::get().reads(1))
			.saturating_add(T::DbWeight::get().writes(1))
	}
}
